package com.yhny.lykj.yuhannongye.net;


import com.longsichao.lscframe.net.Api;
import com.yhny.lykj.yuhannongye.app.UserConfig;
import com.yhny.lykj.yuhannongye.model.BaseModel;
import com.yhny.lykj.yuhannongye.model.*;
import com.yhny.lykj.yuhannongye.tools.LCLog;

/**\
 * http://www.2cto.com/kf/201606/514939.html post方法
 */
public class NetHelper {
    //域名
    private static final String HOST = "http://yuhan.lanyukj.net/index.php/api/index/index";//测试版
    private static final String PATH = "";
    public static final int PAGE_NUM = 10;
    public static final String ACTION = "action";//接口名称
    public static final String APPID = "appid";//id编号
    public static final String APPID_VALUE = "365q7zqhm71fl6oe";//id编号
    public static final String APPSECRET = "appsecret";//应用密钥
    public static final String APPSECRET_VALUE = "d3z6p6TdwsQiZCPVhwmWVFHwhcp5BgQi";//应用密钥

    public static final String PAGE= "page";//页码
    public static final String ROWS= "rows";//页码数量
    public static final String UID= "user_id";

    public static class User{
        private static String PATH = HOST;
        /**
         * 注册
         * @return
         */
        public static Api register(String phone, String password, String code, String recommend){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "usersign"));

            builder.addQueryParameter(new Api.StringSet("username", phone));
            builder.addQueryParameter(new Api.StringSet("usertel", phone));
            builder.addQueryParameter(new Api.StringSet("userpassword", password));
            builder.addQueryParameter(new Api.StringSet("code", code));
            builder.addQueryParameter(new Api.StringSet("usersignip", recommend));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 修改密码
         * @param phone 电话号码
         * @param password 用户填写的重复密码
         * @param newpassword 用户填写的新密码
         * @param code 用户填写验证码
         * @return
         */
        public static Api modifyPassword(String phone, String password, String newpassword, String code){
            String path = PATH+"changePassword";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "changePassword"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("mobile", phone));
            builder.addQueryParameter(new Api.StringSet("repassword", password));
            builder.addQueryParameter(new Api.StringSet("newpassword", newpassword));
//            builder.addQueryParameter(new Api.StringSet("againPassword", againPassword));
            builder.addQueryParameter(new Api.StringSet("verify", code));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 忘记密码
         * @param phone
         * @param newpassword
         * @param code
         * @return
         */
        public static Api unKnowPassword(String phone, String newpassword, String code){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "forgetpassword"));

            builder.addQueryParameter(new Api.StringSet("usertel", phone));
            builder.addQueryParameter(new Api.StringSet("userpassword", newpassword));
            builder.addQueryParameter(new Api.StringSet("code", code));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         *发送验证码
         * @param phone
         * @return
         */
        public static Api sendSMS(String phone){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "mes"));
            builder.addQueryParameter(new Api.StringSet("tel", phone));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
        /**
         * 登录
         * @return
         */
        public static Api login(String phone, String password,String userlastloginip){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "userlogin"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet("usertel", phone));
            builder.addQueryParameter(new Api.StringSet("userlastloginip", userlastloginip));
            builder.addQueryParameter(new Api.StringSet("userpassword", password));
            builder.setModelClass(UserInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 获取个人信息
         * @return
         */
        public static Api getUserInfo(){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "getuserinfo"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.setModelClass(UserInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         *绑定推荐人
         * @return
         */
        public static Api setMemberMem(String re_uid){
            String path = PATH+"member_mem";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "member_mem"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("mobile", re_uid));
            builder.setModelClass(UserInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 绑定归属商家
         * @param re_uid
         * @return
         */
        public static Api setMemberMer(String re_uid){
            String path = PATH+"member_mer";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "member_mer"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("mer_id", re_uid));
            builder.setModelClass(UserInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 编辑个人信息
         * @param truename 真实姓名
         * @param brithday 出生日期
         * @param sex 性别 1男2女
         * @param id_card 身份证号
         * @return
         */
        public static Api modifyUserInfo(String truename, String brithday, String sex, String id_card){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "upuser"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));

            builder.addQueryParameter(new Api.StringSet("username", truename));
            builder.addQueryParameter(new Api.StringSet("userdate", brithday));
            builder.addQueryParameter(new Api.StringSet("usersex", ""+sex));
            builder.addQueryParameter(new Api.StringSet("userident", ""+id_card));

            builder.setModelClass(SmsModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }



        /**
         * 消费记录
         * @return
         */
        public static Api getPayInfoList(String type){
            String path = PATH+"member_integral";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "member_integral"));
            builder.addQueryParameter(new Api.StringSet("type", type));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.setModelClass(PayInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 获取城市列表
         * @return
         */
        public static Api getCityList(){
            String path = PATH+"citys";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "citys"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.setModelClass(CityListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 绑定会员卡
         * @return
         */
        public static Api getBindCard(String userCard){
            String path = PATH+"bind_card";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "bind_card"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("user_card", userCard));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 查询余额
         * @return
         */
        public static Api getUserBalance(){
            String path = PATH+"user_balance";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "user_balance"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.setModelClass(BanlanceInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 昨日与今日收入
         * @return
         */
        public static Api getUserTomBalance(){
            String path = PATH+"member_return_record";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "member_return_record"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.setModelClass(UserRecordModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 关于我们
         * @return
         */
        public static Api aboutUs(){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "aboutme"));
            builder.setModelClass(AboutModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 用户注册协议
         * @return
         */
        public static Api getRegAgreement(){
            String path = PATH+"reg_agreement";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "reg_agreement"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.setModelClass(AboutModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 添加收货地址
         * @param truename 真实姓名
         * @param address 地址
         * @param mobile 电话
         * @return
         */
        public static Api addAddress(String truename, String address, String mobile){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "addaddress"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("name", truename));
            builder.addQueryParameter(new Api.StringSet("address", address));
            builder.addQueryParameter(new Api.StringSet("tel", mobile));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 获取收货地址列表
         * @return
         */
        public static Api getAddressList(){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "searchadresslist"));
//
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.setModelClass(AddressListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
        public static Api getAddress(){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "getAddress"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.setModelClass(AddressInfoModel1.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 删除收货地址
         * @return
         */
        public static Api delAddress(String addressid){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "deladdress"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("addressid", addressid));
//            builder.setModelClass(PayInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 编辑收货地址
         * @return
         */
        public static Api modifyAddress(String aid, String truename, String address, String mobile, String if_default){
            String path = PATH+"addressEdit";
            Api.Builder builder = new Api.Builder ();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "addressEdit"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));

            builder.addQueryParameter(new Api.StringSet("default", if_default));
            builder.addQueryParameter(new Api.StringSet("truename", truename));
            builder.addQueryParameter(new Api.StringSet("address", address));
            builder.addQueryParameter(new Api.StringSet("mobile", mobile));
            builder.addQueryParameter(new Api.StringSet("aid", aid));

            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 收获地址详情
         * @param aid
         * @return
         */
        public static Api getAddressInfo(String aid){
            String path = PATH+"addressDet";
            Api.Builder builder = new Api.Builder ();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "addressDet"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));

            builder.addQueryParameter(new Api.StringSet("aid", aid));

            builder.setModelClass(AddressInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 设置默认地址
         * @return
         */
        public static Api normalAddress(String addressid){
            String path = PATH;
            Api.Builder builder = new Api.Builder();

            builder.addQueryParameter(new Api.StringSet(ACTION, "setAddress"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("addressid", addressid));
            builder.setBaseUrl(path );
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

    }
    public static class Order{
        private static String PATH = HOST;

        /**
         * 订单列表
         * @return
         */
        public static Api getOrderList(String state,int page){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "orderlist"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("state", state));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, 10));
            builder.setModelClass(OrderListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }


        /**
         * 订单详情（线上）
         * @return
         */
        public static Api getOrderInfo(String order_id){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "orderinfo"));

            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("ordernumber", order_id));
            builder.setModelClass(OrderInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }





        /**
         * 删除订单
         * @param order_id
         * @return
         */
        public static Api delOrder(String order_id){
            String path = PATH+"orderDel";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "orderDel"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("order_id", order_id));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 确认收货
         * @param order_id
         * @return
         */
        public static Api doneOrder(String order_id){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "shouhuo"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("ordernumber", order_id));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }







    }
    /**
     * 商品
     */
    public static class Shop{
        private static String PATH = HOST;

        /**
         * 商品分类
         * @return
         */
        public static Api getShopType(){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "searchtypelist"));
            builder.setModelClass(ShopTypeModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
        /**
         * 商品列表
         * @param rows
         * @return
         */
        public static Api getShopList(String fid, int rows){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "searchgoodslist"));
            builder.addQueryParameter(new Api.StringSet("type", fid));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, 100));
            builder.setModelClass(ShopListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
        public static Api getShopList1(String cid, String price, String sale, String leave, String price_min, String price_max, int rows){
            String path = PATH+"goodList";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "goodList"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("cid", cid));
            builder.addQueryParameter(new Api.StringSet("price", price));
            builder.addQueryParameter(new Api.StringSet("sale", sale));
            builder.addQueryParameter(new Api.StringSet("class", leave));
            builder.addQueryParameter(new Api.StringSet("price_min", price_min));
            builder.addQueryParameter(new Api.StringSet("price_max", price_max));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, 4));
            builder.setModelClass(ShopListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 猜你喜欢
         * @param rows
         * @return
         */
        public static Api getLikeList(int rows){
            String ACTION_NAME="searchgoodshotlist";
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, ACTION_NAME));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, 4));
            builder.setModelClass(ShopListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
        public static Api searchgoodcomlist(int rows){
            String ACTION_NAME="searchgoodcomlist";
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, ACTION_NAME));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, 4));
            builder.setModelClass(ShopListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        public static Api searchgoodsdaylist(int rows){
            String ACTION_NAME="searchgoodsdaylist";
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, ACTION_NAME));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, 4));
            builder.setModelClass(ShopListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }



        /**
         * 获取商品详情
         * @param id
         * @return
         */
        public static Api getShopInfo(String id){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "searchgoodsinfo"));
            builder.addQueryParameter(new Api.StringSet("goodsid", id));
            builder.setModelClass(ShopInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 最新商品
         * @return
         */
        public static Api searchgoodsnewlist(){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "searchgoodsnewlist"));
            builder.addQueryParameter(new Api.StringSet(PAGE, 1));
            builder.addQueryParameter(new Api.StringSet(UID, "28"));
            builder.addQueryParameter(new Api.StringSet(ROWS, 4));
            builder.setModelClass(ShopListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
        public static Api keywordssearch(String keywords,int page){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "keywordssearch"));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet("keywords",keywords ));
            builder.addQueryParameter(new Api.StringSet(ROWS, 10));
            builder.setModelClass(ShopListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }












    }
    /**
     * 购物车
     */
    public static class Car{
        private static String PATH = HOST;

        /**
         * 添加购物车
         * @return
         */
        public static Api addCar(String goodsid,String goodsNum){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path);
            builder.addQueryParameter(new Api.StringSet(ACTION, "addship"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("goodsid", goodsid));
            builder.addQueryParameter(new Api.StringSet("goodsnum", goodsNum));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 添加订单
         * @return
         */
        public static Api addOrder(){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path);

            builder.setModelClass(AboutModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }


        /**
         * 获取购物车列表
         * @param rows
         * @return
         */
        public static Api getCarList(int rows){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "searchshiplist"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(CarChildModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 删除购物车
         * @return
         */
        public static Api delCarInfo(){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
//            builder.addQueryParameter(new Api.StringSet(ACTION, "delship"));
//            builder.addQueryParameter(new Api.StringSet("shipid", shipid));
            builder.setModelClass(CarListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
    }
    /**
     * 海报
     */
    public static class Poster{
        private static String PATH = HOST;

        /**
         * 获取海报列表
         * @return
         */
        public static Api getPosterList(int rows){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "searchactivitylist"));

            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));

            builder.setModelClass(PosterListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 获取海报详情
         * @return
         */
        public static Api getPosterDetail(String id){
            String path = PATH+"posterDetail";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "posterDetail"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));

            builder.addQueryParameter(new Api.StringSet("poster_id", id));
            builder.setModelClass(PosterInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
    }
    /**
     * 咨询
     */
    public static class Advice {
        private static String PATH = HOST;

        /**
         * 获取咨询列表
         * @param rows
         * @return
         */
        public static Api getAdviceList(int rows){
            String path = PATH+"advice";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "advice"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(AdviceListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 添加咨询
         * @param content
         * @return
         */
        public static Api addAdvice(String content){
            String path = PATH+"advice";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "addAdvice"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("content", content));
            builder.setModelClass(AddAdviceInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

    }
    /**
     * 工具
     */
    public static class Tools {
        private static String PATH = HOST;
        public static Api postImage(){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "uppic"));
            builder.addQueryParameter(new Api.StringSet("userid", UserConfig.getConfigUserId()));
            builder.setModelClass(ImageModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**8
         * 获取app版本号
         * @return
         */
        public static Api getAppVersion(){
            String path = PATH+"app_info";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "app_info"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.setModelClass(AppVersionModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
    }
    public static class Message {
        private static String PATH = HOST;

        /**
         * 消息列表
         * @return
         */
        public static Api getNoticeList(int rows){
            String path = PATH;
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "searcharticlelist"));
            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, 100));
            builder.setModelClass(MsgListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 通知详情
         * @param nid
         * @return
         */
        public static Api getNoticeInfo(String nid){
            String path = PATH+"notice_info";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "notice_info"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("nid", nid));
            builder.setModelClass(MsgInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 未读通知数量
         * @return
         */
        public static Api getNoticeRead(){
            String path = PATH+"notice_read";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "notice_read"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.setModelClass(ReadMsgInfo.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 签到信息
         * @param year
         * @param month
         * @return
         */
        public static Api getSigList(String year, String month){
            String path = PATH+"sign_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "sign_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("year", year));
            builder.addQueryParameter(new Api.StringSet("month", month));
            builder.setModelClass(SignInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 签到记录
         * @param year
         * @param month
         * @return
         */
        public static Api getSigHistoryList(){
            String path = PATH+"sign_integral_record";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "sign_integral_record"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.setModelClass(SinHistoryListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 会员签到
         * @return
         */
        public static Api getSigMember(){
            String path = PATH+"sign_member";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "sign_member"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(UID, UserConfig.getConfigUserId()));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 客服电话
         * @return
         */
        public static Api getMoblie(){
            String path = PATH+"mobile";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "mobile"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.setModelClass(MoblieModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 成为商家
         * @return
         */
        public static Api getMerchant(){
            String path = PATH+"set_merchant";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "set_merchant"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.setModelClass(MoblieModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

    }

    /**
     * 旅游
     */
    public static class Tourism
    {
        private static String PATH = HOST;

        /**
         * 主题列表
         * @param rows
         * @return
         */
        public static Api getThemeList(int rows){
            String path = PATH+"raiders_driving_theme";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "raiders_driving_theme"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(TourismThemeListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 主题文章列表
         * @param rows
         * @return
         */
        public static Api getDriviingList(String theme, int rows){
            String path = PATH+"raiders_driving_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "raiders_driving_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("theme", theme));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(DrivieListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 文章详情
         * @param id
         * @return
         */
        public static Api getDriviingInfo(String id ){
            String path = PATH+"raiders_driving_info";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "raiders_driving_info"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("id", id));
            builder.setModelClass(DrivieInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 主图
         * @return
         */
        public static Api getThemeImage(){
            String path = PATH+"raiders_driving_img";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "raiders_driving_img"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.setModelClass(DrivieImageModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 后台游记攻略列表
         * @param rows
         * @return
         */
        public static Api getRaidersList(int rows){
            String path = PATH+"raiders_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "raiders_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(RaidersListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 后台攻略详情
         * @param rid
         * @return
         */
        public static Api getRaidersInfo(String rid){
            String path = PATH+"raiders_info";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "raiders_info"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("rid", rid));
            builder.setModelClass(RaidersInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 收藏攻略
         * @param rid
         * @return
         */
        public static Api getRaidersFollow(String rid){
            String path = PATH+"raiders_follow";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "raiders_follow"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("rid", rid));
            builder.setModelClass(RaidersInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 收藏的攻略
         * @param rows
         * @return
         */
        public static Api getRaidersFollowList(int rows){
            String path = PATH+"raiders_follow_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "raiders_follow_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(RaidersListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 用户攻略列表
         * @param rows
         * @return
         */
        public static Api getRaidersUserList(int rows){
            String path = PATH+"raiders_user_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "raiders_user_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(RaidersUserListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 我发布的旅游信息
         * @param rows
         * @return
         */
        public static Api getMyRaidersUserList(int rows){
            String path = PATH+"myraiders_user_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "myraiders_user_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(RaidersUserListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 用户发布攻略
         * @param title
         * @param content
         * @param img
         * @return
         */
        public static Api setRaidersUserList(String title, String content, String img){
            String path = PATH+"raiders_add";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "raiders_add"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet("title", title));
            builder.addQueryParameter(new Api.StringSet("content", content));
            builder.addQueryParameter(new Api.StringSet("img", img));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
    }

    /**
     * 生活服务
     */
    public static class Life {
        private static String PATH = HOST;


        /**
         * 生活服务分类列表
         * @param page
         * @param rows
         * @return
         */
        public static Api getLifeTypeList(String classId, String one, int page, int rows){
            String path = PATH+"life_type_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "life_type_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("one", one));
            builder.addQueryParameter(new Api.StringSet("class", classId));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, rows));
            builder.setModelClass(ShopTypeModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 生活服务推荐列表
         * @param page
         * @return
         */
        public static Api getLiftHotList(int page){
            String path = PATH+"life_nums_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "life_nums_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(LifeListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 生活服务列表
         * @param page
         * @return
         */
        public static Api getLifeList(String type, String city, int page){
            String path = PATH+"life_nums_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "life_nums_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("type", type));
            builder.addQueryParameter(new Api.StringSet("city", city));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(LifeListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 生活服务列表
         * @param type
         * @param city
         * @param name
         * @param page
         * @return
         */
        public static Api searchLifeList(String type, String city, String name, int page){
            String path = PATH+"life_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "life_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("type", type));
            builder.addQueryParameter(new Api.StringSet("city", city));
            builder.addQueryParameter(new Api.StringSet("name", name));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(LifeListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 生活服务相似列表
         * @param id
         * @param page
         * @return
         */
        public static Api getLifeLikeList(String id, int page){
            String path = PATH+"life_like_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "life_like_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("id", id));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(LifeListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 服务详情
         * @param id
         * @return
         */
        public static Api getLifeInfo(String id){
            String path = PATH+"life_info";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "life_info"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("id", id));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.setModelClass(LifeInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         *收藏/取消收藏生活服务
         * @param id
         * @return
         */
        public static Api getLifeFollow(String id){
            String path = PATH+"life_follow";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "life_follow"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("id", id));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 我收藏的生活服务
         * @param page
         * @return
         */
        public static Api getLifeFolowList(int page){
            String path = PATH+"life_follow_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "life_follow_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(LifeListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
        public static Api getMyLifeList(int page){
            String path = PATH+"mylife_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "mylife_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(LifeListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
        /**
         * 发布生活服务
         * @return
         */
        public static Api getLifePost(){
            String path = PATH+"life_add";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }
    }
    public static class Recruit {
        private static String PATH = HOST;

        /**
         * 职位类别
         * @param page
         * @return
         */
        public static Api getPostionList(int page){
            String path = PATH+"recruit_position_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "recruit_position_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, 100));
            builder.setModelClass(RecruitPostionTypeModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 工作年限
         * @param page
         * @return
         */
        public static Api getYearList(int page){
            String path = PATH+"recruit_year_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "recruit_year_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, 100));
            builder.setModelClass(RecruitPostionTypeModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 薪资水平
         * @param page
         * @return
         */
        public static Api getSalaryList(int page){
            String path = PATH+"recruit_salary_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "recruit_salary_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, 100));
            builder.setModelClass(RecruitPostionTypeModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         *招聘列表
         * @param page
         * @return
         */
        public static Api getList(String city_id, String position_id, String salary_id, String search, int page){
            String path = PATH+"recruit_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "recruit_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.addQueryParameter(new Api.StringSet("city_id", city_id));
            builder.addQueryParameter(new Api.StringSet("search", search));
            builder.addQueryParameter(new Api.StringSet("position_id", position_id));
            builder.addQueryParameter(new Api.StringSet("salary_id", salary_id));
            builder.setModelClass(RecruitListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 我发布的招聘信息
         * @param page
         * @return
         */
        public static Api getMList(int page){
            String path = PATH+"myrecruit_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "myrecruit_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.addQueryParameter(new Api.StringSet("user_id", UserConfig.getConfigUserId()));
            builder.setModelClass(RecruitListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 相似职位
         * @param page
         * @return
         */
        public static Api getLikeList(String id, int page){
            String path = PATH+"recruit_like_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "recruit_like_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, page));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.addQueryParameter(new Api.StringSet("id", id));
            builder.setModelClass(RecruitListModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 信息详情
         * @param id
         * @return
         */
        public static Api getInfo(String id){
            String path = PATH+"recruit_info";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.addQueryParameter(new Api.StringSet(ACTION, "recruit_info"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("id", id));
            builder.setModelClass(RecruitInfoModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

        /**
         * 发布招聘信息
         * @return
         */
        public static Api postInfo(){
            String path = PATH+"recruit_add";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path );
            builder.setModelClass(BaseModel.class);
            LCLog.e("getUrl = " +builder.build().getUrl());
            return builder.build();
        }

    }
    /**
     * 微信支付
     */
    public static class WXPay {
        private static String PATH = HOST;

        public static Api wxpay(String order_id) {
            String path = PATH + "wxpay";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path);
            builder.addQueryParameter(new Api.StringSet(ACTION, "wxpay"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("order_id", order_id));
            builder.setModelClass(WeCharPayModel.class);
            LCLog.e("getUrl = " + builder.build().getUrl());
            return builder.build();
        }
    }

    /**
     * 问题与反馈
     */
    public static class Question {
        private static String PATH = HOST;

        /**
         * 问题分类
         * @param rows
         * @return
         */
        public static Api getTypeList(int rows) {
            String path = PATH + "problem_type";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path);
            builder.addQueryParameter(new Api.StringSet(ACTION, "problem_type"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(QuestionTypeListModel.class);
            LCLog.e("getUrl = " + builder.build().getUrl());
            return builder.build();
        }

        /**
         * 问题列表
         * @param rows
         * @return
         */
        public static Api getList(String type, int rows) {
            String path = PATH + "problem_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path);
            builder.addQueryParameter(new Api.StringSet(ACTION, "problem_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet("type", type));
            builder.addQueryParameter(new Api.StringSet("top", "0"));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(QuestionListModel.class);
            LCLog.e("getUrl = " + builder.build().getUrl());
            return builder.build();
        }

        /**
         * 常见问题
         * @param type
         * @param rows
         * @return
         */
        public static Api getTopList(String type, int rows) {
            String path = PATH + "problem_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path);
            builder.addQueryParameter(new Api.StringSet(ACTION, "problem_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet("type", type));
            builder.addQueryParameter(new Api.StringSet("top", "1"));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(QuestionListModel.class);
            LCLog.e("getUrl = " + builder.build().getUrl());
            return builder.build();
        }

        /**
         * 问题详情
         * @param id
         * @return
         */
        public static Api getInfo(String id) {
            String path = PATH + "problem_info";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path);
            builder.addQueryParameter(new Api.StringSet(ACTION, "problem_info"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("id", id));
            builder.setModelClass(QuestionInfoModel.class);
            LCLog.e("getUrl = " + builder.build().getUrl());
            return builder.build();
        }
    }
    public static class News {
        private static String PATH = HOST;

        /**
         * 消息列表
         *
         * @return
         */
        public static Api getNewsList(int rows) {
            String path = PATH + "news_list";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path);
            builder.addQueryParameter(new Api.StringSet(ACTION, "news_list"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet(PAGE, rows));
            builder.addQueryParameter(new Api.StringSet(ROWS, PAGE_NUM));
            builder.setModelClass(NewsListModel.class);
            LCLog.e("getUrl = " + builder.build().getUrl());
            return builder.build();
        }
        public static Api getNewsInfo(String id) {
            String path = PATH + "news_info";
            Api.Builder builder = new Api.Builder();
            builder.setBaseUrl(path);
            builder.addQueryParameter(new Api.StringSet(ACTION, "news_info"));
            builder.addQueryParameter(new Api.StringSet(APPID, APPID_VALUE));
            builder.addQueryParameter(new Api.StringSet(APPSECRET, APPSECRET_VALUE));
            builder.addQueryParameter(new Api.StringSet("id", id));
            builder.setModelClass(NewsInfoModel.class);
            LCLog.e("getUrl = " + builder.build().getUrl());
            return builder.build();
        }
    }
}
